package com.woniuxy.carrental.mapper;


import com.woniuxy.carrental.entity.Supplier;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 供应商信息表  SupplierMapper   Dao
 * @author xilei
 * @create 2021-09-22 下午 3:38
 */
@Mapper
public interface SupplierMapper {
    //查所有供应商信息
    List<Supplier> findSupplier();
    //分页查供应商信息
    List<Supplier> findSupplierByPage(@Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);
    //分页查+按条件查供应商信息
    List<Supplier> findSupplierByPageByParam(@Param("supplier_name") String supplier_name,
                                             @Param("supplier_address") String supplier_address,
                                             @Param("supplier_telephone") String supplier_telephone,
                                             @Param("supplier_contant") String supplier_contant,
                                             @Param("pageIndex") int pageIndex,
                                             @Param("pageSize") int pageSize);
    //改供应商信息
    void updateSupplier(@Param("supplier_name") String supplier_name,
                    @Param("supplier_address") String supplier_address,
                    @Param("supplier_telephone") String supplier_telephone,
                    @Param("supplier_contant") String supplier_contant,
                    @Param("supplier_id") Integer supplier_id);
    //删供应商信息
    void deleteSupplier(Integer supplier_id);
    //增供应商信息
    void insertSupplier(Supplier supplier);
}
